package com.w2cx.selenium.operate;

import com.w2cx.selenium.base.DriverBase;
import com.w2cx.selenium.page.ColdBootManagePage;
import org.openqa.selenium.WebElement;

import java.awt.color.CMMException;

public class ColdBootManageOperate {

    DriverBase driver;
    ColdBootManagePage cmp;
    public ColdBootManageOperate(DriverBase driver){
        this.driver = driver;
        cmp = new ColdBootManagePage(driver);
    }

    //点击运营管理菜单
    public void clickOperateManageMenu(){
        cmp.click(cmp.getOperateManageMenu());
    }

    //点击“冷启动管理”菜单
    public void clickColdBootManageMenu(){
        cmp.click(cmp.getColdBootManageMenu());
    }

    //点击内容管理
    public void clickContentManageLink(){
        cmp.click(cmp.getContentManageLink());
    }


    //点击“选择内容”按钮
    public void clickSelectContentBtn(){
        cmp.click(cmp.getSelectContentBtn());
    }

    //选中内容id
    public String getSelectedContentID(){
        return cmp.getSelectedContentID().getText();
    }

    //点击复选框
    public void clickSelectContentCheckBox(){
        cmp.click(cmp.getSelectContentCheckBox());
    }

    //点击关闭按钮
    public void clickCloseBtn(){
        cmp.click(cmp.getCloseBtn());
    }

    //获取内容id
    public String getFirstContentID(){
        return cmp.getFirstContentID().getText();
    }

    //点击删除按钮
    public void clickDelBtn(){
        cmp.click(cmp.getDelBtn());
    }

    //点击确定按钮
    public void clickDelConfirmBtn(){
        cmp.click(cmp.getDelConfirmBtn());
    }



}
